Optimal. Leaf size=382 \[ -\frac {3 B (b c-a d) g^3 n (a+b x)^2}{4 d^2 i^3 (c+d x)^2}-\frac {3 b B (b c-a d) g^3 n (a+b x)}{d^3 i^3 (c+d x)}+\frac {b (b c-a d) g^3 (3 A+B n) (a+b x)}{d^3 i^3 (c+d x)}+\frac {3 b B (b c-a d) g^3 (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{d^3 i^3 (c+d x)}+\frac {g^3 (a+b x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{d i^3 (c+d x)^2}+\frac {(b c-a d) g^3 (a+b x)^2 \left (3 A+B n+3 B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{2 d^2 i^3 (c+d x)^2}+\frac {b^2 (b c-a d) g^3 \left (3 A+B n+3 B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log \left (\frac {b c-a d}{b (c+d x)}\right )}{d^4 i^3}+\frac {3 b^2 B (b c-a d) g^3 n \text {Li}_2\left (\frac {d (a+b x)}{b (c+d x)}\right )}{d^4 i^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.28, antiderivative size = 382, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 8, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.186, Rules used = {2561, 2384, 45,
2393, 2332, 2341, 2354, 2438} \begin {gather*} \frac {3 b^2 B g^3 n (b c-a d) \text {PolyLog}\left (2,\frac {d (a+b x)}{b (c+d x)}\right )}{d^4 i^3}+\frac {b^2 g^3 (b c-a d) \log \left (\frac {b c-a d}{b (c+d x)}\right ) \left (3 B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+3 A+B n\right )}{d^4 i^3}+\frac {b g^3 (a+b x) (3 A+B n) (b c-a d)}{d^3 i^3 (c+d x)}+\frac {g^3 (a+b x)^2 (b c-a d) \left (3 B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+3 A+B n\right )}{2 d^2 i^3 (c+d x)^2}+\frac {g^3 (a+b x)^3 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{d i^3 (c+d x)^2}+\frac {3 b B g^3 (a+b x) (b c-a d) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{d^3 i^3 (c+d x)}-\frac {3 b B g^3 n (a+b x) (b c-a d)}{d^3 i^3 (c+d x)}-\frac {3 B g^3 n (a+b x)^2 (b c-a d)}{4 d^2 i^3 (c+d x)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 2332
Rule 2341
Rule 2354
Rule 2384
Rule 2393
Rule 2438
Rule 2561
Rubi steps
\begin {align*} \int \frac {(a g+b g x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(151 c+151 d x)^3} \, dx &=\int \left (\frac {b^3 g^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3442951 d^3}+\frac {(-b c+a d)^3 g^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3442951 d^3 (c+d x)^3}+\frac {3 b (b c-a d)^2 g^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3442951 d^3 (c+d x)^2}-\frac {3 b^2 (b c-a d) g^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3442951 d^3 (c+d x)}\right ) \, dx\\ &=\frac {\left (b^3 g^3\right ) \int \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx}{3442951 d^3}-\frac {\left (3 b^2 (b c-a d) g^3\right ) \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{c+d x} \, dx}{3442951 d^3}+\frac {\left (3 b (b c-a d)^2 g^3\right ) \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(c+d x)^2} \, dx}{3442951 d^3}-\frac {\left ((b c-a d)^3 g^3\right ) \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(c+d x)^3} \, dx}{3442951 d^3}\\ &=\frac {A b^3 g^3 x}{3442951 d^3}+\frac {(b c-a d)^3 g^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{6885902 d^4 (c+d x)^2}-\frac {3 b (b c-a d)^2 g^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3442951 d^4 (c+d x)}-\frac {3 b^2 (b c-a d) g^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{3442951 d^4}+\frac {\left (b^3 B g^3\right ) \int \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \, dx}{3442951 d^3}+\frac {\left (3 b^2 B (b c-a d) g^3 n\right ) \int \frac {(c+d x) \left (-\frac {d (a+b x)}{(c+d x)^2}+\frac {b}{c+d x}\right ) \log (c+d x)}{a+b x} \, dx}{3442951 d^4}+\frac {\left (3 b B (b c-a d)^2 g^3 n\right ) \int \frac {b c-a d}{(a+b x) (c+d x)^2} \, dx}{3442951 d^4}-\frac {\left (B (b c-a d)^3 g^3 n\right ) \int \frac {b c-a d}{(a+b x) (c+d x)^3} \, dx}{6885902 d^4}\\ &=\frac {A b^3 g^3 x}{3442951 d^3}+\frac {b^2 B g^3 (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{3442951 d^3}+\frac {(b c-a d)^3 g^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{6885902 d^4 (c+d x)^2}-\frac {3 b (b c-a d)^2 g^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3442951 d^4 (c+d x)}-\frac {3 b^2 (b c-a d) g^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{3442951 d^4}+\frac {\left (3 b^2 B (b c-a d) g^3 n\right ) \int \left (\frac {b \log (c+d x)}{a+b x}-\frac {d \log (c+d x)}{c+d x}\right ) \, dx}{3442951 d^4}-\frac {\left (b^2 B (b c-a d) g^3 n\right ) \int \frac {1}{c+d x} \, dx}{3442951 d^3}+\frac {\left (3 b B (b c-a d)^3 g^3 n\right ) \int \frac {1}{(a+b x) (c+d x)^2} \, dx}{3442951 d^4}-\frac {\left (B (b c-a d)^4 g^3 n\right ) \int \frac {1}{(a+b x) (c+d x)^3} \, dx}{6885902 d^4}\\ &=\frac {A b^3 g^3 x}{3442951 d^3}+\frac {b^2 B g^3 (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{3442951 d^3}+\frac {(b c-a d)^3 g^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{6885902 d^4 (c+d x)^2}-\frac {3 b (b c-a d)^2 g^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3442951 d^4 (c+d x)}-\frac {b^2 B (b c-a d) g^3 n \log (c+d x)}{3442951 d^4}-\frac {3 b^2 (b c-a d) g^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{3442951 d^4}+\frac {\left (3 b^3 B (b c-a d) g^3 n\right ) \int \frac {\log (c+d x)}{a+b x} \, dx}{3442951 d^4}-\frac {\left (3 b^2 B (b c-a d) g^3 n\right ) \int \frac {\log (c+d x)}{c+d x} \, dx}{3442951 d^3}+\frac {\left (3 b B (b c-a d)^3 g^3 n\right ) \int \left (\frac {b^2}{(b c-a d)^2 (a+b x)}-\frac {d}{(b c-a d) (c+d x)^2}-\frac {b d}{(b c-a d)^2 (c+d x)}\right ) \, dx}{3442951 d^4}-\frac {\left (B (b c-a d)^4 g^3 n\right ) \int \left (\frac {b^3}{(b c-a d)^3 (a+b x)}-\frac {d}{(b c-a d) (c+d x)^3}-\frac {b d}{(b c-a d)^2 (c+d x)^2}-\frac {b^2 d}{(b c-a d)^3 (c+d x)}\right ) \, dx}{6885902 d^4}\\ &=\frac {A b^3 g^3 x}{3442951 d^3}-\frac {B (b c-a d)^3 g^3 n}{13771804 d^4 (c+d x)^2}+\frac {5 b B (b c-a d)^2 g^3 n}{6885902 d^4 (c+d x)}+\frac {5 b^2 B (b c-a d) g^3 n \log (a+b x)}{6885902 d^4}+\frac {b^2 B g^3 (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{3442951 d^3}+\frac {(b c-a d)^3 g^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{6885902 d^4 (c+d x)^2}-\frac {3 b (b c-a d)^2 g^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3442951 d^4 (c+d x)}-\frac {7 b^2 B (b c-a d) g^3 n \log (c+d x)}{6885902 d^4}+\frac {3 b^2 B (b c-a d) g^3 n \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{3442951 d^4}-\frac {3 b^2 (b c-a d) g^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{3442951 d^4}-\frac {\left (3 b^2 B (b c-a d) g^3 n\right ) \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,c+d x\right )}{3442951 d^4}-\frac {\left (3 b^2 B (b c-a d) g^3 n\right ) \int \frac {\log \left (\frac {d (a+b x)}{-b c+a d}\right )}{c+d x} \, dx}{3442951 d^3}\\ &=\frac {A b^3 g^3 x}{3442951 d^3}-\frac {B (b c-a d)^3 g^3 n}{13771804 d^4 (c+d x)^2}+\frac {5 b B (b c-a d)^2 g^3 n}{6885902 d^4 (c+d x)}+\frac {5 b^2 B (b c-a d) g^3 n \log (a+b x)}{6885902 d^4}+\frac {b^2 B g^3 (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{3442951 d^3}+\frac {(b c-a d)^3 g^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{6885902 d^4 (c+d x)^2}-\frac {3 b (b c-a d)^2 g^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3442951 d^4 (c+d x)}-\frac {7 b^2 B (b c-a d) g^3 n \log (c+d x)}{6885902 d^4}+\frac {3 b^2 B (b c-a d) g^3 n \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{3442951 d^4}-\frac {3 b^2 (b c-a d) g^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{3442951 d^4}-\frac {3 b^2 B (b c-a d) g^3 n \log ^2(c+d x)}{6885902 d^4}-\frac {\left (3 b^2 B (b c-a d) g^3 n\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {b x}{-b c+a d}\right )}{x} \, dx,x,c+d x\right )}{3442951 d^4}\\ &=\frac {A b^3 g^3 x}{3442951 d^3}-\frac {B (b c-a d)^3 g^3 n}{13771804 d^4 (c+d x)^2}+\frac {5 b B (b c-a d)^2 g^3 n}{6885902 d^4 (c+d x)}+\frac {5 b^2 B (b c-a d) g^3 n \log (a+b x)}{6885902 d^4}+\frac {b^2 B g^3 (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{3442951 d^3}+\frac {(b c-a d)^3 g^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{6885902 d^4 (c+d x)^2}-\frac {3 b (b c-a d)^2 g^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3442951 d^4 (c+d x)}-\frac {7 b^2 B (b c-a d) g^3 n \log (c+d x)}{6885902 d^4}+\frac {3 b^2 B (b c-a d) g^3 n \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{3442951 d^4}-\frac {3 b^2 (b c-a d) g^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{3442951 d^4}-\frac {3 b^2 B (b c-a d) g^3 n \log ^2(c+d x)}{6885902 d^4}+\frac {3 b^2 B (b c-a d) g^3 n \text {Li}_2\left (\frac {b (c+d x)}{b c-a d}\right )}{3442951 d^4}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.29, size = 334, normalized size = 0.87 \begin {gather*} \frac {g^3 \left (4 A b^3 d x-\frac {B (b c-a d)^3 n}{(c+d x)^2}+\frac {10 b B (b c-a d)^2 n}{c+d x}+10 b^2 B (b c-a d) n \log (a+b x)+4 b^2 B d (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+\frac {2 (b c-a d)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(c+d x)^2}-\frac {12 b (b c-a d)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{c+d x}-14 b^2 B (b c-a d) n \log (c+d x)-12 b^2 (b c-a d) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)+6 b^2 B (b c-a d) n \left (\left (2 \log \left (\frac {d (a+b x)}{-b c+a d}\right )-\log (c+d x)\right ) \log (c+d x)+2 \text {Li}_2\left (\frac {b (c+d x)}{b c-a d}\right )\right )\right )}{4 d^4 i^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.14, size = 0, normalized size = 0.00 \[\int \frac {\left (b g x +a g \right )^{3} \left (A +B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )\right )}{\left (d i x +c i \right )^{3}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 2731 vs. \(2 (360) = 720\).
time = 0.74, size = 2731, normalized size = 7.15 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {g^{3} \left (\int \frac {A a^{3}}{c^{3} + 3 c^{2} d x + 3 c d^{2} x^{2} + d^{3} x^{3}}\, dx + \int \frac {A b^{3} x^{3}}{c^{3} + 3 c^{2} d x + 3 c d^{2} x^{2} + d^{3} x^{3}}\, dx + \int \frac {B a^{3} \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}}{c^{3} + 3 c^{2} d x + 3 c d^{2} x^{2} + d^{3} x^{3}}\, dx + \int \frac {3 A a b^{2} x^{2}}{c^{3} + 3 c^{2} d x + 3 c d^{2} x^{2} + d^{3} x^{3}}\, dx + \int \frac {3 A a^{2} b x}{c^{3} + 3 c^{2} d x + 3 c d^{2} x^{2} + d^{3} x^{3}}\, dx + \int \frac {B b^{3} x^{3} \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}}{c^{3} + 3 c^{2} d x + 3 c d^{2} x^{2} + d^{3} x^{3}}\, dx + \int \frac {3 B a b^{2} x^{2} \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}}{c^{3} + 3 c^{2} d x + 3 c d^{2} x^{2} + d^{3} x^{3}}\, dx + \int \frac {3 B a^{2} b x \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}}{c^{3} + 3 c^{2} d x + 3 c d^{2} x^{2} + d^{3} x^{3}}\, dx\right )}{i^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (a\,g+b\,g\,x\right )}^3\,\left (A+B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\right )}{{\left (c\,i+d\,i\,x\right )}^3} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________